package com.bgIntlgn.client.entity.sells;

import java.util.Date;

import yuhuibear.poat.annotations.action.AutoGenerateValue;
import yuhuibear.poat.annotations.relation.Field;
import yuhuibear.poat.annotations.relation.Table;
import yuhuibear.poat.object.bean.Bean;

/**
 * 客户报价表的条目
 * 
 * @author yuhui
 * 
 */
@Table(name = "quotation_cargos", constrain = "")
public class QuotationCargo implements Bean {
	@AutoGenerateValue(skipOnNull = true, sqlToGet = "select currval('quotation_cargos_id_seq')")
	@Field(name = "id", type = "bigserial", constrain = "primary key ")
	private Long id;

	/**
	 * 对应的报价单
	 */
	@Field(name = "quotation_id", type = "int8 ", constrain = " not null references quotations(id) on update cascade on delete cascade")
	private Long quotationId;

	/**
	 * 指向一个具体版本
	 */
	@Field(name = "uid", type = "char(80)", constrain = " not null references element_subversions(uid) on update cascade on delete cascade")
	private String uid;

	/**
	 * 报价
	 */
	@Field(name = "price", type = "float ", constrain = " not null default 0.0")
	private Double price;
	
	@Field(name = "number", type = "int", constrain = "not null default 0")
	private int number;

	@Field(name = "comment", type = "varchar(100)", constrain = "")
	private String comment;
	
	@Field(name = "deiliver_day", type = "date", constrain = "")
	private Date deiliverDay;

	public Long getId() {
		return this.id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Long getQuotationId() {
		return this.quotationId;
	}

	public void setQuotationId(Long quotationId) {
		this.quotationId = quotationId;
	}

	public String getUid() {
		return this.uid;
	}

	public void setUid(String uid) {
		this.uid = uid;
	}

	public Double getPrice() {
		return this.price;
	}

	public void setPrice(Double price) {
		this.price = price;
	}

	public String getComment() {
		return this.comment;
	}

	public void setComment(String comment) {
		this.comment = comment;
	}

	public Date getDeiliverDay() {
		return deiliverDay;
	}

	public void setDeiliverDay(Date deiliverDay) {
		this.deiliverDay = deiliverDay;
	}
	
	public int getNumber() {
		return number;
	}

	public void setNumber(int number) {
		this.number = number;
	}

}
